package com.burstly.jackson.map.deser;

import com.burstly.jackson.JsonParser;
import com.burstly.jackson.JsonProcessingException;
import com.burstly.jackson.map.DeserializationContext;
import com.burstly.jackson.map.JsonDeserializer;
import com.burstly.jackson.map.TypeDeserializer;
import com.burstly.jackson.type.JavaType;
import java.io.IOException;

public class AbstractDeserializer extends JsonDeserializer<Object>
{
  protected final boolean _acceptBoolean;
  protected final boolean _acceptDouble;
  protected final boolean _acceptInt;
  protected final boolean _acceptString;
  protected final JavaType _baseType;

  public AbstractDeserializer(JavaType paramJavaType)
  {
    this._baseType = paramJavaType;
    Class localClass = paramJavaType.getRawClass();
    this._acceptString = localClass.isAssignableFrom(String.class);
    boolean bool1;
    boolean bool2;
    label66: boolean bool3;
    if ((localClass != Boolean.TYPE) && (!localClass.isAssignableFrom(Boolean.class)))
    {
      bool1 = false;
      this._acceptBoolean = bool1;
      if ((localClass == Integer.TYPE) || (localClass.isAssignableFrom(Integer.class)))
        break label107;
      bool2 = false;
      this._acceptInt = bool2;
      if (localClass == Double.TYPE)
        break label113;
      boolean bool4 = localClass.isAssignableFrom(Double.class);
      bool3 = false;
      if (bool4)
        break label113;
    }
    while (true)
    {
      this._acceptDouble = bool3;
      return;
      bool1 = true;
      break;
      label107: bool2 = true;
      break label66;
      label113: bool3 = true;
    }
  }

  protected Object _deserializeIfNatural(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext)
    throws IOException, JsonProcessingException
  {
    switch ($SWITCH_TABLE$com$burstly$jackson$JsonToken()[paramJsonParser.getCurrentToken().ordinal()])
    {
    default:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    }
    do
    {
      do
      {
        do
        {
          do
          {
            do
              return null;
            while (!this._acceptString);
            return paramJsonParser.getText();
          }
          while (!this._acceptInt);
          return Integer.valueOf(paramJsonParser.getIntValue());
        }
        while (!this._acceptDouble);
        return Double.valueOf(paramJsonParser.getDoubleValue());
      }
      while (!this._acceptBoolean);
      return Boolean.TRUE;
    }
    while (!this._acceptBoolean);
    return Boolean.FALSE;
  }

  public Object deserialize(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext)
    throws IOException, JsonProcessingException
  {
    throw paramDeserializationContext.instantiationException(this._baseType.getRawClass(), "abstract types can only be instantiated with additional type information");
  }

  public Object deserializeWithType(JsonParser paramJsonParser, DeserializationContext paramDeserializationContext, TypeDeserializer paramTypeDeserializer)
    throws IOException, JsonProcessingException
  {
    Object localObject = _deserializeIfNatural(paramJsonParser, paramDeserializationContext);
    if (localObject != null)
      return localObject;
    return paramTypeDeserializer.deserializeTypedFromObject(paramJsonParser, paramDeserializationContext);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.jackson.map.deser.AbstractDeserializer
 * JD-Core Version:    0.6.2
 */